
<!-- BEGIN:main -->


<script>

    function submitForm(ac)
    {
        var form = document.phpForm;
        if (ac == 'cancel')
        {
            form.hdAction.value = ac;
            form.submit();
        }
        else
        {
            var fullName = $('#txtFullName');
            var password = $('#txtPassword');
            var rePassword = $('#txtRePassword');
            var groupID = $('#slGroupID');

            var arrayInput = new Array(fullName,groupID);
            
            var hasError = validateEmptyValue(arrayInput);

            if(!hasError){ 
                if (rePassword.val() != password.val()) {
                    alert('Mật khẩu xác nhận không trùng với mật khẩu, vui lòng nhập lại');
                    rePassword.focus();
                } else {
                    form.hdAction.value = ac;
                    form.submit();
                }
            }else{
                alert('vui lòng điền đầy đủ thông tin');
            }
        }
    }

</script>



<div id="toolbar-box">
    <div class="d_divide5"></div>
    <div class="toolbar" id="toolbar">
        <table class="toolbar">
            <tbody>
                <tr>
                    <td class="button" id="toolbar-save">
                        <a href="javascript:void()" onclick="submitForm('editAndExit')" class="toolbar">
                            <span class="icon-32-save" title="Lưu và thoát">
                            </span>
                            Lưu và thoát
                        </a>
                    </td>

                    <td class="button" id="toolbar-apply">
                        <a href="javascript:void()" onclick="submitForm('edit')" class="toolbar">
                            <span class="icon-32-apply" title="Lưu">
                            </span>
                            Lưu
                        </a>
                    </td>

                    <td class="button" id="toolbar-cancel">
                        <a href="javascript:void()" onclick="submitForm('cancel')" class="toolbar">
                            <span class="icon-32-cancel" title="Hủy">
                            </span>
                            Hủy
                        </a>
                    </td>


                </tr>

            </tbody>
        </table>
    </div>
    <div class="header icon_48_user_edit">
        Người dùng <small><small>[ Cập nhật ]</small></small><br>
    </div>

    <div class="d_divide5"></div>
</div>

<div class="d_divide10"></div>
<div class="d_clear"></div>

<div id="element-box">


    <form method="post" name="phpForm">

        <div>
            <fieldset class="adminform">

                <legend>Thông người dùng </legend>

                <div class="d_divide5"></div>

                <!--user name-->
                <div>
                    <label for="txtUserName" class="d_label">Tên đăng nhập: <b style="color: red;">*</b></label>
                    <input readonly="true" class="d_text_input" style="width: 350px" name="txtUserName" id="txtUserName" title="Tên đăng nhập" type="text" size="50" value="{USER_NAME}">
                </div>


                <div class="d_divide5"></div>

                <!--fullname-->
                <div>
                    <label for="txtFullName" class="d_label">Họ tên: <b style="color: red;">*</b></label> 
                    <input value="{FULL_NAME}" class="d_text_input" style="width: 350px" name="txtFullName" id="txtFullName" title="Họ tên" type="text" size="50">
                </div>


                <div class="d_divide5"></div>

                <!--group-->
                <div>
                    <label for="slGroupID" class="d_label">Quyền: <b style="color: red;">*</b></label>
                    <select id="slGroupID" name="slGroupID" class="d_text_input" style="width: 350px">
                        <option value="">-- Chọn Quyền --</option>

                        <!-- BEGIN:group_list -->
                        <option {SELECTED} value="{GROUP_ID}">{GROUP_NAME}</option>
                        <!-- END:group_list -->

                    </select>
                </div>

                <div class="d_divide5"></div>

                <!--password-->
                <div>
                    <label for="txtPassword" class="d_label">Mật khẩu mới </label>
                    <input class="d_text_input" name="txtPassword" id="txtPassword" style="width: 350px" title="Password" type="password" size="50">
                </div>


                <div class="d_divide5"></div>

                <!--re-password-->
                <div>
                    <label for="txtRePassword" class="d_label">Xác nhận mật khẩu </label>
                    <input class="d_text_input" style="width: 350px" name="txtRePassword" id="txtRePassword" title="Re Password" type="password" size="50">
                </div>

                <div class="d_divide5"></div>

                <!--email-->
                <div>
                    <label for="txtEmail" class="d_label">Email</label>
                    <input value="{EMAIL}" class="d_text_input" style="width: 350px" name="txtEmail" id="txtEmail" title="Email" type="text" size="50">
                </div>


                <div class="d_divide5"></div>




                <!--status-->
                <div>

                    <!-- BEGIN:status_true -->
                    <label for="rdoStatus" class="d_label" style="margin-right: 10px">Bật/Tắt: </label>
                    <input name="rdoStatus" id="rdoStatus1" value="0" class="inputbox" type="radio">Tắt
                    <input name="rdoStatus" id="rdoStatus" value="1" checked="checked" class="inputbox" type="radio">Bật
                    <!-- ENd:status_true -->

                    <!-- BEGIN:status_false -->
                    <label for="rdoStatus" class="d_label" style="margin-right: 10px">Bật/Tắt: </label>
                    <input name="rdoStatus" id="rdoStatus1" value="0" class="inputbox" type="radio" checked="checked">Tắt
                    <input name="rdoStatus" id="rdoStatus" value="1"  class="inputbox" type="radio">Bật
                    <!-- ENd:status_false -->                        
                </div>

                <div class="d_divide5"></div>

                <input type="hidden" id="hdAction" name="hdAction" value="" />
                <input type="hidden" id="hdOldPassword" name="hdOldPassword" value="{PASSWORD}" />
                <input type="hidden" id="hdOldGroupID" name="hdOldGroupID" value="{GROUP_ID}" />
                <input type="hidden" id="hdID" name="hdID" value="{USER_ID}" />

            </fieldset>
        </div>
        <div class="clr"></div>
    </form>
</div>

<noscript>
!Cảnh báo! Javascript phải được bật để chạy được các chức năng trong phần Quản trị
</noscript>

<!-- END:main -->